home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / editor / auror300.zip / WSKBD.AML < prev    next >
Text File  |  1996-07-17  |  24KB  |  588 lines

  1. //--------------------------------------------------------------------
  2. // The Aurora Editor v3.0, Copyright (C) 1993-1996 nuText Systems
  3. //
  4. // KBD.AML
  5. // WordStar/Borland IDE Keyboard definitions (included by Main.aml)
  6. //
  7. // If you have made any changes, save this file and select Recompile
  8. // the Editor from the Set menu. Exit and re-enter the editor for
  9. // your changes to take effect.
  10. //--------------------------------------------------------------------
  11.  
  12. //--------------------------------------------------------------------
  13. //  Edit and File Manager windows
  14. //--------------------------------------------------------------------
  15.  
  16. object edit_fmgr
  17.  
  18.   // Controls
  19.   function  '≡'                                // close window
  20.     close
  21.   end
  22.  
  23.   // Menu activation
  24.   key  <esc>           gotobar                 // to last menu bar item (ws)
  25.   key  <f10>           call <esc>              // to last menu bar item (ws)
  26.   key  <alt f10>       gotomenu                // goto last pull-down menu
  27.   key  <f1>            gotomenu "help"         // goto help pull-down menu (ws)
  28.   key  <ctrl j>        call <f1>               // goto help pull-down menu (ws)
  29.  
  30.   // alt-key access to pulldown menus
  31.   key  <alt f>         gotomenu "file"         // file menu
  32.   key  <alt w>         gotomenu "window"       // window menu
  33.   key  <alt b>         gotomenu "block"        // block menu
  34.   key  <alt s>         gotomenu "search"       // search menu
  35.   key  <alt o>         gotomenu "fold"         // fold menu
  36.   key  <alt e>         gotomenu "edit"         // edit menu
  37.   key  <alt c>         gotomenu "clip"         // clipboard menu
  38.   key  <alt p>         gotomenu "print"        // print menu
  39.   key  <alt t>         gotomenu "set"          // set menu
  40.   key  <alt a>         gotomenu "macro"        // macro menu
  41.   key  <alt h>         gotomenu "help"         // help menu
  42.  
  43.   // Scroll
  44.   key  <pgdn>          pagedown                // scroll down (ws)
  45.   key  <ctrl c>        send <pgdn>             // scroll down (ws)
  46.  
  47.   key  <pgup>          pageup                  // scroll up (ws)
  48.   key  <ctrl r>        send <pgup>             // scroll up (ws)
  49.  
  50.   key  <ctrl home>     row (getviewtop)        // to page top (ws)
  51.   key  <ctrl q><e>     send <ctrl home>        // to page top (ws)
  52.  
  53.   key  <ctrl end>      row (getviewbot)        // to page bottom (ws)
  54.   key  <ctrl q><x>     send <ctrl end>         // to page bottom (ws)
  55.  
  56.   key  <ctrl pgup>     row 1                   // to file top (ws)
  57.   key  <ctrl q><r>     send <ctrl pgup>        // to file top (ws)
  58.  
  59.   key  <ctrl pgdn>     row (getlines)          // to file bottom (ws)
  60.   key  <ctrl q><c>     send <ctrl pgdn>        // to file bottom (ws)
  61.  
  62.   key  <ctrl o><v>     adjustrow               // center cursor (ws)
  63.   key  <ctrl f9>       adjustrow 1             // scroll to page top
  64.   key  <ctrl f10>      adjustrow (getviewrows) // scroll to page bottom
  65.  
  66.   // scroll up one line (ws)
  67.   key  <ctrl up>
  68.     rollrow -1
  69.     if getrow < getviewbot then
  70.       down
  71.     end
  72.   end
  73.   key  <ctrl w>  call <ctrl up>
  74.  
  75.   // scroll down one line (ws)
  76.   key  <ctrl down>
  77.     rollrow 1
  78.     if getrow > getviewtop then
  79.       up
  80.     end
  81.   end
  82.   key  <ctrl z>  call <ctrl down>
  83.  
  84.   key  <ctrl q><p>     lastpos                 // to last cursor position (ws)
  85.  
  86.   // File
  87.   key  <ctrl k><e>     askopen                 // open prompt (ws)
  88.   key  <f3>            call <ctrl k><e>        // open prompt (ws)
  89.   key  <alt z>         openlast                // open last window
  90.   key  <alt 0>         filelist                // file list (ws)
  91.   key  <ctrl k><q>     close                   // close window (ws)
  92.   key  <alt x>         closeall                // close all windows (ws)
  93.   key  <shift f1>      quickref 'qw'           // quick function reference
  94.   key  <shift f2>      quickref 'fw'           // function reference
  95.  
  96.   // Window
  97.   key  <f5>            maximize                // maximize window (ws)
  98.   key  <f6>            nextwindow              // next window (ws)
  99.   key  <shift f6>      prevwindow              // prev window
  100.   key  <shift f3>      tile 'v'                // tile vertical
  101.   key  <shift f4>      tile 'h'                // tile horizontal
  102.   key  <shift f5>      cascade                 // cascade
  103.   key  <alt f3>        deletewin               // close window (ws)
  104.  
  105.   // Search
  106.   key  <ctrl o><s>     askscan                 // file scan prompt
  107.   key  <ctrl q><b>     gotomark 't'            // find top of block (ws)
  108.   key  <ctrl q><k>     gotomark 'b'            // find bot of block (ws)
  109.   key  <ctrl 6>        cyclebook               // cycle through bookmarks
  110.  
  111.   // Print
  112.   key  <ctrl k><p>     print 'b'               // print block (ws)
  113.  
  114.   // Set
  115.   key  <ctrl f1>       togglemode              // toggle video mode
  116.   key  <alt f2>        recompile               // recompile the editor
  117.   key  <alt f9>        recompile               // recompile the editor (ws)
  118.  
  119.   // Macro
  120.   key  <alt f8>        askruncap               // Dos capture prompt
  121.   key  <ctrl k><f>     shell                   // exit to Dos (ws)
  122.   key  <shift f12>     pickmacro               // macro picklist
  123.   key  <ctrl f12>      runmacro2 "maclist"     // macro menu
  124.  
  125.   // undefined or unnamed keys
  126.   key <otherkey> (keycode)
  127.     say (geteventname (keycode)) + " not defined"
  128.   end
  129.  
  130.  
  131. //--------------------------------------------------------------------
  132. // Prompts and Edit windows
  133. //--------------------------------------------------------------------
  134.  
  135. object prompt
  136.  
  137.   // Controls
  138.   function  '≡'        close                   // close window
  139.   end
  140.  
  141.   function  '*'        enter                   // simulate <enter>
  142.   end                                          //  (2-line box only)
  143.  
  144.   // Cursor
  145.   key  <left>          left                    // move cursor left (ws)
  146.   key  <ctrl s>        left                    // move cursor left (ws)
  147.   key  <right>         right                   // move cursor right (ws)
  148.   key  <ctrl d>        right                   // move cursor right (ws)
  149.   key  <home>          col 1                   // to column one (ws)
  150.   key  <ctrl q><s>     col 1                   // to column one (ws)
  151.   key  <end>           col  getlinelen + 1     // to end of line (ws)
  152.   key  <ctrl q><d>     col  getlinelen + 1     // to end of line (ws)
  153.  
  154.   // Cursor + CUA-marking
  155.   key  <shift left>    left
  156.                        smark
  157.   key  <shift right>   right
  158.                        smark
  159.   key  <shift home>    col 1
  160.                        smark
  161.   key  <shift end>     col getlinelen + 1
  162.                        smark
  163.  
  164.   // Scroll
  165.   key  <f7>            rollcol -(getviewcols - 1)   // page left
  166.   key  <f8>            rollcol   getviewcols - 1    // page right
  167.  
  168.   // Editing
  169.   key  <ins>           setting 'I' TOGGLE      // toggle insert mode (ws)
  170.   key  <ctrl v>        call <ins>              // toggle insert mode (ws)
  171.  
  172.   key  <del>           delchar                 // delete character (ws)
  173.   key  <ctrl g>        call <del>              // delete character (ws)
  174.  
  175.   key  <backspace>     backsp                  // delete left character (ws)
  176.   key  <ctrl h>        call <backspace>        // delete left character (ws)
  177.  
  178.   key  <ctrl q><y>     delchar MAX_COL         // erase to end of line (ws)
  179.   key  <ctrl q><del>   delchar getcol - 1 1    // erase to beginning of line (ws)
  180.   key  <ctrl p>        literal                 // enter literal character (ws)
  181.   key  <alt =>         asciilist               // display ascii chart
  182.  
  183.   // Block
  184.  
  185.   // mark block
  186.   function  markblock
  187.     if _mtype == 'k' then
  188.       markcolumn
  189.     else
  190.       markstream
  191.     end
  192.   end
  193.  
  194.   // toggle between stream and column marking
  195.   function  marktoggle
  196.     set _mtype  if? _mtype == 'k' '' 'k'
  197.     say "Column marking turned " + (if? _mtype == 'k' "On" "Off")
  198.   end
  199.  
  200.   // mark block (ws)
  201.   key  <ctrl k><b>     markblock
  202.   key  <ctrl k><k>     call <ctrl k><b>
  203.  
  204.   // toggle column mode (ws)
  205.   key  <ctrl k><n>     marktoggle
  206.  
  207.   key  <ctrl k>